package com.kylinhunter.ch.plugin.knowledgebase.dao;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import org.hibernate.annotations.GenericGenerator;

/**
 * AbstractChkbfile entity provides the base persistence definition of the
 * Chkbfile entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractChkbfile implements java.io.Serializable {

	// Fields

	private String id;
	private Chcode chcode;
	private String filename;
	private String remark;
	private String flag;
	private String valid;
	private String reserve;

	// Constructors

	/** default constructor */
	public AbstractChkbfile() {
	}

	/** minimal constructor */
	public AbstractChkbfile(Chcode chcode, String filename, String valid) {
		this.chcode = chcode;
		this.filename = filename;
		this.valid = valid;
	}

	/** full constructor */
	public AbstractChkbfile(Chcode chcode, String filename, String remark,
			String flag, String valid, String reserve) {
		this.chcode = chcode;
		this.filename = filename;
		this.remark = remark;
		this.flag = flag;
		this.valid = valid;
		this.reserve = reserve;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FILETYPE", nullable = false)
	public Chcode getChcode() {
		return this.chcode;
	}

	public void setChcode(Chcode chcode) {
		this.chcode = chcode;
	}

	@Column(name = "FILENAME", nullable = false, length = 20)
	public String getFilename() {
		return this.filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "FLAG", length = 10)
	public String getFlag() {
		return this.flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	@Column(name = "VALID", nullable = false, length = 10)
	public String getValid() {
		return this.valid;
	}

	public void setValid(String valid) {
		this.valid = valid;
	}

	@Column(name = "RESERVE", length = 30)
	public String getReserve() {
		return this.reserve;
	}

	public void setReserve(String reserve) {
		this.reserve = reserve;
	}

}